package com.linln.modules.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linln.common.enums.StatusEnum;
import com.linln.common.utils.StatusUtil;
import com.linln.modules.system.domain.User;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author hyf
 * @date 2021/10/11
 */
@Data
@Entity
@Table(name="miss_banner")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
public class Banner implements Serializable {
    // 主键ID
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Long id;
    // 标题
    private String image;
    // 备注
    private String url;
    // 创建时间
    @CreatedDate
    private Timestamp insertTime;
    // 更新时间
    @LastModifiedDate
    private Timestamp updateTime;

    private Integer deleted;
    /** 数据状态 */
    private Byte status = StatusEnum.OK.getCode();
}